<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>Hello SyntaxHighlighter</title>
	<script type="text/javascript" src="scripts/shCore.js"></script>
	<script type="text/javascript" src="scripts/shBrushJScript.js"></script>
	<link type="text/css" rel="stylesheet" href="styles/shCoreDefault.css"/>
	<script type="text/javascript">SyntaxHighlighter.all();</script>
	
	<script type="text/javascript" src="scripts/`shBrushjava.js"></script>
	<link href='http://syntaxhighlighter.googlecode.com/svn/trunk/Styles/`SyntaxHighlighter.css' rel='stylesheet' type='text/css'/>
	
</head>


<pre class="brush: js;">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> trinhthaovn@gmail.com </title>
	<style type="text/css">
		l1	{ /* chữ nhạt nhỏ */
			font-size	:20px;
			font-weight	:bold;
			font-family :Arial;
			Color		:#FFFA51;
			}
		l2	{ /* chữ nhạt to  */
			font-size	:30px;
			font-weight	:bold;
			font-family :time new roman;
			Color		:#FFFA51;
			}
		b1	{ /* chữ đậm nhỏ  */
			font-size	:20px;
			font-weight	:bold;
			font-family :time new roman;
			Color		:#4033CB;
			}	
		b2	{ /* chữ đậm to  */
			font-size	:30px;
			font-weight	:bold;
			font-family :time new roman;
			Color		:#4033CB;
			}	
	</style>

</head>
<body>
	<?php
		if(isset($_POST["a"]) && isset($_POST["b"]))
		{
			$a=$_POST["a"];
			$b=$_POST["b"];
			$to=0;
			$ti=1;
			$tc=0;
			$tl=0;
			for ($i=$a;$i<=$b;$i++)
				{
					$to=$to+$i;
					$ti=$ti*$i;
					if($i%2==0)
						{$tc=$tc+$i;}	
						else	//	elseif($i%2!=0)
						{$tl=$tl+$i;}
				}
		}
	?>

<center>
	<form name="thao" method="post" action="2.17_tinhDaySo.php">
    	<table border="0" bgcolor="#FFFFCC" width="500">
        	<tr bgcolor="#336699"> <td colspan="2" align="center">  <l2> Tính trên dẫy số  </l2></td> 
        	</tr>
            
            <tr> <td> Số khởi đầu </td> <td> 	<input type="text" name="a" value="<?php echo $_POST["a"]; ?>"> </td> </tr>
            <tr> <td> Số kết thúc</td> <td> 	<input type="text" name="b" value="<?php echo $_POST["b"]; ?>"></td> </tr>
            <tr> <td> Tổng</td> <td> 			<input type="text" name="to" value="<?php echo $to; ?>" readonly></td> </tr>
            <tr> <td> Tích</td> <td> 			<input type="text" name="ti" value="<?php echo $ti; ?>" readonly></td> </tr>
            <tr> <td> Tổng chẵn</td> <td> 		<input type="text" name="tc" value="<?php echo $tc; ?>" readonly></td> </tr>
            <tr> <td> Tổng lẽ</td> <td> 		<input type="text" name="tl" value="<?php echo $tl; ?>" readonly></td> </tr>
                      
            <tr> <td colspan="2" align="center"> <hr> 
            				<input type="submit" value=" Thực hiện "> &#160;&#160;&#160;&#160;&#160;
                            <input type="reset" value="  làm lại  " >
             </td> </tr>
        </table>
    </form>
</center>
</body>
</html>


</pre>

</html>
